﻿using System;
using System.Collections.Generic;
using MediaSage.Lib.Database;

namespace MediaSage.Lib.UIFramework.Dialog.Entities
{
    public class DialogMappingEntity : DatabaseObject
    {
        /// <summary>
        /// Defines a unique id
        /// </summary>
        public virtual Guid ID { get; protected set; }

        /// <summary>
        /// Defines the static text in the message, in the event of a dialog it is the text in the dialog box
        /// </summary>
        public virtual string MessageText { get; set; }

        /// <summary>
        /// Defines the window title if any
        /// </summary>
        public virtual string MessageCaption { get; set; }

        /// <summary>
        /// When the dialog box is closed, this is the number of the option selected
        /// String.Empty until it is actually written to
        /// </summary>
        public virtual string DialogResult { get; set; }

        /// <summary>
        /// The options available for he dialog
        /// <example>
        ///     yes,no : For a dialog asking a question
        ///     OK : For an information pane
        ///     Movie#1,Movie#2,Movie#3: For a list of movies to select
        /// </example>
        /// </summary>
        public virtual IList<OptionEntity> ResultOptions { get; set; }

        /// <summary>
        /// Defines the message type for dialog boxes
        /// </summary>
        public virtual MessageType MsgType { get; set; }

        /// <summary>
        /// How long the dialog stays active
        /// </summary>
        public virtual int? Timeout { get; set; }

        /// <summary>
        /// Displays a graphic in the dialog window if set to anything besides an empty string
        /// </summary>
        public virtual string DisplayGraphic { get; set; }

        public DialogMappingEntity()
        {
            DialogResult = String.Empty;
            ResultOptions = new List<OptionEntity>();
            DisplayGraphic = String.Empty;
        }
    }
}